$(function(){
	loadStaticsSum();
	$('#operationPanel').panel("refresh", "orderProcessController.do?claimedTask");
    $("#storeDiv").on("click", function(){
    	
    	openwindow('产品库存', 'productStoreController.do?productStore', '',900,500);
    });
    $("#userDiv").on("click", function(){
    	openwindow('客户信息', 'customerController.do?customer', '',900,500);
    });
    $("#incomeDiv").on("click", function(){
    	openwindow('收入', 'flowDetailIncomeController.do?queryFlowDetailIncome', '',900,500);
    });
    $("#payoutDiv").on("click", function(){
    	openwindow('支出', 'flowDetailPayoutController.do?queryFlowDetailPayout', '',900,500);
    });
    $("#newOrderDiv").on("click", function(){
    	$('#operationPanel').panel("refresh", "orderInfoController.do?orderInfo");
    });
    $("#waitingDiv").on("click", function(){
    	$('#operationPanel').panel("refresh", "orderProcessController.do?claimedTask");
    });
    $("#finishedDiv").on("click", function(){
    	$('#operationPanel').panel("refresh", "orderProcessController.do?finishedTask");
    });
 
});

function loadStaticsSum(){
	$.doAjaxCall("homeController.do?statisticSum",'',loadStaticsSumCallBack,true);
}

function loadStaticsSumCallBack(json){
	$("#storeSum").html(json.obj.sum_store);
	$("#userSum").html(json.obj.count_customer);
	$("#incomeSum").html(json.obj.sum_income);
	$("#payoutSum").html(json.obj.sum_payout);
}



	
